package com.huawei.appgallery.wishlist.ui.cardkit.card;

import android.content.Context;
import android.view.View;
import android.widget.TextView;
import com.huawei.appgallery.foundation.ui.framework.cardkit.bean.CardBean;
import com.huawei.appgallery.wishlist.ui.cardkit.bean.WishBaseInfoCardBean;
import o.azb;
import o.cgz;
import o.chy;
import o.dbx;
import o.dce.e;
import o.dce.j;
import o.evx;

public class WishBaseInfoCard extends cgz {
    private View ʻ;
    private TextView ˊ;
    private TextView ˋ;
    private TextView ˎ;
    private TextView ˏ;
    private TextView ॱ;

    public WishBaseInfoCard(Context context) {
        super(context);
    }

    public cgz ˏ(View view) {
        azb.ॱ(view, e.ꜞ);
        this.ˋ = (TextView) view.findViewById(e.ʽᐝ);
        this.ˋ.setAllCaps(false);
        this.ˏ = (TextView) view.findViewById(e.ʼˊ);
        this.ˎ = (TextView) view.findViewById(e.ʻᐝ);
        this.ˊ = (TextView) view.findViewById(e.ʻˋ);
        this.ʻ = view.findViewById(e.ॱʽ);
        this.ॱ = (TextView) view.findViewById(e.ʼᐝ);
        ʽ(view);
        return this;
    }

    public void ˏ(CardBean cardBean) {
        super.ˏ(cardBean);
        if (cardBean instanceof WishBaseInfoCardBean) {
            WishBaseInfoCardBean wishBaseInfoCardBean = (WishBaseInfoCardBean) cardBean;
            this.ˋ.setText(wishBaseInfoCardBean.ॱ());
            this.ˏ.setText(wishBaseInfoCardBean.ʽ());
            this.ˎ.setText(wishBaseInfoCardBean.ˊ());
            if (wishBaseInfoCardBean.ᐝ() == 1) {
                this.ˊ.setText(j.ʻॱ);
            } else {
                this.ˊ.setText(j.ʼ);
            }
            if (dbx.ˏ().ॱ()) {
                switch (wishBaseInfoCardBean.ʼ()) {
                    case 0:
                        this.ʻ.setVisibility(8);
                        return;
                    case 1:
                        this.ॱ.setText(j.ˎˎ);
                        this.ʻ.setVisibility(0);
                        return;
                    case 2:
                        this.ॱ.setText(j.ˋˋ);
                        this.ʻ.setVisibility(0);
                        return;
                    case 3:
                        this.ॱ.setText(j.ˍ);
                        this.ʻ.setVisibility(0);
                        return;
                    default:
                        return;
                }
            }
            this.ʻ.setVisibility(8);
        }
    }

    public void ॱ(final chy o_chy) {
        this.ʻ.setOnClickListener(new evx(this) {
            final /* synthetic */ WishBaseInfoCard ˏ;

            public void ˋ(View view) {
                o_chy.ˏ(10009, this.ˏ);
            }
        });
    }
}
